<?
/*********************************************
*说明页详细
* *******************************************/
function smarty_function_qishi_explain_show($params, &$smarty)
{ 
extract($params);
global $db;
$id = (NULL != $id) ? $id : 0;
if (intval($id)!=$id) return false;
$sql = "select * from ".table('explain')." WHERE  id=".intval($id);
$val=$db->getone($sql);
//------------
if ($val['seo_keywords']=="")
{
$val['keywords']=$val['title'];
}
else
{
$val['keywords']=$val['seo_keywords'];
}
//-----
if ($val['seo_description']=="")
{
$val['description']=cut_str(html2text($val['content']),60,0,"");
}
else
{
$val['description']=$val['seo_description'];
}
$smarty->assign($listname, $val);
unset($val);
}
?>